//C10:10_2
#include <iostream>

int fibonacci(int n)
{
    if(n >=1 and n <= 2)
    {
        return 1;
    }
    else 
    {
        return fibonacci(n - 1) + fibonacci(n - 2);
    }
}

int main(void)
{
    int n;
    static int result;
    const int SIZE = 20;
    int my_array[SIZE];
    std::cout << "Enter a integer number:\n";
    std::cin >> n;
    //result = fibonacci(n);

    for(int i = 1; i < SIZE; i++)
    {
        my_array[i] = fibonacci(i);
    }
    
    for(int i = 1; i <SIZE; i++)
    {
        std::cout << my_array[i] << ' ';
    }
    std::cout << '\n';

    result = fibonacci(n);
    std::cout << "fibonacci " << n << '\n';
    std::cout << "Result is: " << result << '\n';
    
}